package base.day09;

import java.util.Random;

public class practice {
    //生成一个数字和四个字母的验证码
    public static void main(String[] args) {
        char[] ch=new char[52];
        for (int i = 0; i < ch.length; i++) {
            if (i<25){
                ch[i]=(char)(97+i);
            }
            else{
                ch[i]=(char)(65+i-26);
            }
        }
        String st="";
        Random rd=new Random();
        for (int i = 0; i < 4; i++) {
            int rdindex= rd.nextInt(ch.length);
            st=st+ch[rdindex];
        }
        int number= rd.nextInt(9);
        st=number+st;
        System.out.println(st);
    }
}
